package com.zcf.controller;


import com.zcf.common.json.Body;
import com.zcf.service.UserRecordServiceImpl;
import com.zcf.vo.out.LayuiJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZhaoQi
 * @since 2019-03-18
 */
@CrossOrigin
@Controller
@RequestMapping("/userRecord")
public class UserRecordController {

	@Autowired
	UserRecordServiceImpl userRecordServiceImpl;

	/**
	 * 获取战绩详情
	 * @return
	 */
	@PostMapping("userRecordList")
	@ResponseBody
	public Body userRecordList(Long userid,Integer type){
		return userRecordServiceImpl.userRecordList(userid,type,20);
	}

	/**
	 * @description :查询今日流水总账
	 * @date : 2019/11/29 9:45
	 * @author : jj
	 */
	@PostMapping("waste" )
	@ResponseBody
	public LayuiJson toDayPumping(){
		LayuiJson layuiJson = userRecordServiceImpl.waste();
		return layuiJson;
	}

	/**
	 * 获取战绩详情
	 * @return
	 */
	@PostMapping("userSum")
	@ResponseBody
	public Body userSum(Long userid,Integer type){
		return userRecordServiceImpl.userRecordList(userid,type,20);
	}

}

